import java.util.List;

import play.*;
import play.jobs.*;
import play.test.*;
 
import models.*;
 
@OnApplicationStart
public class Bootstrap extends Job {
 
    public void doJob() {
    	
        // Check if the database is empty
        if(Serie.count() == 0) {
            Fixtures.loadModels("data.yml");
            
            List<Serie> series = Serie.findAll();
            
            for (Serie s : series) {
            	s.fillInfo();
            }
        }
    }
 
}